3.2.7 \(\int (c+d x) (a+a \cosh (e+f x))^2 \, dx\) [107]

Optimal. Leaf size=118 \[ \frac {1}{2} a^2 c x+\frac {1}{4} a^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}-\frac {2 a^2 d \cosh (e+f x)}{f^2}-\frac {a^2 d \cosh ^2(e+f x)}{4 f^2}+\frac {2 a^2 (c+d x) \sinh (e+f x)}{f}+\frac {a^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f} \]

[Out]

1/2*a^2*c*x+1/4*a^2*d*x^2+1/2*a^2*(d*x+c)^2/d-2*a^2*d*cosh(f*x+e)/f^2-1/4*a^2*d*cosh(f*x+e)^2/f^2+2*a^2*(d*x+c
)*sinh(f*x+e)/f+1/2*a^2*(d*x+c)*cosh(f*x+e)*sinh(f*x+e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3398, 3377, 2718, 3391} \begin {gather*} \frac {2 a^2 (c+d x) \sinh (e+f x)}{f}+\frac {a^2 (c+d x) \sinh (e+f x) \cosh (e+f x)}{2 f}+\frac {a^2 (c+d x)^2}{2 d}+\frac {1}{2} a^2 c x-\frac {a^2 d \cosh ^2(e+f x)}{4 f^2}-\frac {2 a^2 d \cosh (e+f x)}{f^2}+\frac {1}{4} a^2 d x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*(a + a*Cosh[e + f*x])^2,x]

[Out]

(a^2*c*x)/2 + (a^2*d*x^2)/4 + (a^2*(c + d*x)^2)/(2*d) - (2*a^2*d*Cosh[e + f*x])/f^2 - (a^2*d*Cosh[e + f*x]^2)/
(4*f^2) + (2*a^2*(c + d*x)*Sinh[e + f*x])/f + (a^2*(c + d*x)*Cosh[e + f*x]*Sinh[e + f*x])/(2*f)

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3391

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*((b*Sin[e + f*x])^n/(f^2*n^
2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[b*(c + d*x)*Cos[e + f*x
]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps

\begin {align*} \int (c+d x) (a+a \cosh (e+f x))^2 \, dx &=\int \left (a^2 (c+d x)+2 a^2 (c+d x) \cosh (e+f x)+a^2 (c+d x) \cosh ^2(e+f x)\right ) \, dx\\ &=\frac {a^2 (c+d x)^2}{2 d}+a^2 \int (c+d x) \cosh ^2(e+f x) \, dx+\left (2 a^2\right ) \int (c+d x) \cosh (e+f x) \, dx\\ &=\frac {a^2 (c+d x)^2}{2 d}-\frac {a^2 d \cosh ^2(e+f x)}{4 f^2}+\frac {2 a^2 (c+d x) \sinh (e+f x)}{f}+\frac {a^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}+\frac {1}{2} a^2 \int (c+d x) \, dx-\frac {\left (2 a^2 d\right ) \int \sinh (e+f x) \, dx}{f}\\ &=\frac {1}{2} a^2 c x+\frac {1}{4} a^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}-\frac {2 a^2 d \cosh (e+f x)}{f^2}-\frac {a^2 d \cosh ^2(e+f x)}{4 f^2}+\frac {2 a^2 (c+d x) \sinh (e+f x)}{f}+\frac {a^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.32, size = 81, normalized size = 0.69 \begin {gather*} \frac {a^2 (-6 (e+f x) (-2 c f+d (e-f x))-16 d \cosh (e+f x)-d \cosh (2 (e+f x))+16 f (c+d x) \sinh (e+f x)+2 f (c+d x) \sinh (2 (e+f x)))}{8 f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*(a + a*Cosh[e + f*x])^2,x]

[Out]

(a^2*(-6*(e + f*x)*(-2*c*f + d*(e - f*x)) - 16*d*Cosh[e + f*x] - d*Cosh[2*(e + f*x)] + 16*f*(c + d*x)*Sinh[e +
 f*x] + 2*f*(c + d*x)*Sinh[2*(e + f*x)]))/(8*f^2)

________________________________________________________________________________________

Maple [A]
time = 0.95, size = 211, normalized size = 1.79

method result size
risch \(\frac {3 d \,a^{2} x^{2}}{4}+\frac {3 a^{2} c x}{2}+\frac {a^{2} \left (2 d x f +2 c f -d \right ) {\mathrm e}^{2 f x +2 e}}{16 f^{2}}+\frac {a^{2} \left (d x f +c f -d \right ) {\mathrm e}^{f x +e}}{f^{2}}-\frac {a^{2} \left (d x f +c f +d \right ) {\mathrm e}^{-f x -e}}{f^{2}}-\frac {a^{2} \left (2 d x f +2 c f +d \right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{2}}\) \(126\)
derivativedivides \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e \,a^{2} \sinh \left (f x +e \right )}{f}-\frac {d e \,a^{2} \left (\frac {\sinh \left (f x +e \right ) \cosh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 a^{2} c \sinh \left (f x +e \right )+a^{2} c \left (\frac {\sinh \left (f x +e \right ) \cosh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) \(211\)
default \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e \,a^{2} \sinh \left (f x +e \right )}{f}-\frac {d e \,a^{2} \left (\frac {\sinh \left (f x +e \right ) \cosh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 a^{2} c \sinh \left (f x +e \right )+a^{2} c \left (\frac {\sinh \left (f x +e \right ) \cosh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) \(211\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+a*cosh(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

1/f*(1/2*d/f*a^2*(f*x+e)^2+2*d/f*a^2*((f*x+e)*sinh(f*x+e)-cosh(f*x+e))+d/f*a^2*(1/2*(f*x+e)*cosh(f*x+e)*sinh(f
*x+e)+1/4*(f*x+e)^2-1/4*cosh(f*x+e)^2)-d/f*e*a^2*(f*x+e)-2*d/f*e*a^2*sinh(f*x+e)-d/f*e*a^2*(1/2*sinh(f*x+e)*co
sh(f*x+e)+1/2*f*x+1/2*e)+a^2*c*(f*x+e)+2*a^2*c*sinh(f*x+e)+a^2*c*(1/2*sinh(f*x+e)*cosh(f*x+e)+1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 176, normalized size = 1.49 \begin {gather*} \frac {1}{2} \, a^{2} d x^{2} + \frac {1}{16} \, {\left (4 \, x^{2} + \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} - \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} a^{2} d + \frac {1}{8} \, a^{2} c {\left (4 \, x + \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} - \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c x + a^{2} d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} - \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {2 \, a^{2} c \sinh \left (f x + e\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*cosh(f*x+e))^2,x, algorithm="maxima")

[Out]

1/2*a^2*d*x^2 + 1/16*(4*x^2 + (2*f*x*e^(2*e) - e^(2*e))*e^(2*f*x)/f^2 - (2*f*x + 1)*e^(-2*f*x - 2*e)/f^2)*a^2*
d + 1/8*a^2*c*(4*x + e^(2*f*x + 2*e)/f - e^(-2*f*x - 2*e)/f) + a^2*c*x + a^2*d*((f*x*e^e - e^e)*e^(f*x)/f^2 -
(f*x + 1)*e^(-f*x - e)/f^2) + 2*a^2*c*sinh(f*x + e)/f

________________________________________________________________________________________

Fricas [A]
time = 0.50, size = 128, normalized size = 1.08 \begin {gather*} \frac {6 \, a^{2} d f^{2} x^{2} + 12 \, a^{2} c f^{2} x - a^{2} d \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} - a^{2} d \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} - 16 \, a^{2} d \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + 4 \, {\left (4 \, a^{2} d f x + 4 \, a^{2} c f + {\left (a^{2} d f x + a^{2} c f\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )}{8 \, f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*cosh(f*x+e))^2,x, algorithm="fricas")

[Out]

1/8*(6*a^2*d*f^2*x^2 + 12*a^2*c*f^2*x - a^2*d*cosh(f*x + cosh(1) + sinh(1))^2 - a^2*d*sinh(f*x + cosh(1) + sin
h(1))^2 - 16*a^2*d*cosh(f*x + cosh(1) + sinh(1)) + 4*(4*a^2*d*f*x + 4*a^2*c*f + (a^2*d*f*x + a^2*c*f)*cosh(f*x
 + cosh(1) + sinh(1)))*sinh(f*x + cosh(1) + sinh(1)))/f^2

________________________________________________________________________________________

Sympy [A]
time = 0.17, size = 219, normalized size = 1.86 \begin {gather*} \begin {cases} - \frac {a^{2} c x \sinh ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c x \cosh ^{2}{\left (e + f x \right )}}{2} + a^{2} c x + \frac {a^{2} c \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} c \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} d x^{2} \sinh ^{2}{\left (e + f x \right )}}{4} + \frac {a^{2} d x^{2} \cosh ^{2}{\left (e + f x \right )}}{4} + \frac {a^{2} d x^{2}}{2} + \frac {a^{2} d x \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} d x \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} d \cosh ^{2}{\left (e + f x \right )}}{4 f^{2}} - \frac {2 a^{2} d \cosh {\left (e + f x \right )}}{f^{2}} & \text {for}\: f \neq 0 \\\left (a \cosh {\left (e \right )} + a\right )^{2} \left (c x + \frac {d x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*cosh(f*x+e))**2,x)

[Out]

Piecewise((-a**2*c*x*sinh(e + f*x)**2/2 + a**2*c*x*cosh(e + f*x)**2/2 + a**2*c*x + a**2*c*sinh(e + f*x)*cosh(e
 + f*x)/(2*f) + 2*a**2*c*sinh(e + f*x)/f - a**2*d*x**2*sinh(e + f*x)**2/4 + a**2*d*x**2*cosh(e + f*x)**2/4 + a
**2*d*x**2/2 + a**2*d*x*sinh(e + f*x)*cosh(e + f*x)/(2*f) + 2*a**2*d*x*sinh(e + f*x)/f - a**2*d*cosh(e + f*x)*
*2/(4*f**2) - 2*a**2*d*cosh(e + f*x)/f**2, Ne(f, 0)), ((a*cosh(e) + a)**2*(c*x + d*x**2/2), True))

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 151, normalized size = 1.28 \begin {gather*} \frac {3}{4} \, a^{2} d x^{2} + \frac {3}{2} \, a^{2} c x + \frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f - a^{2} d\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{2}} + \frac {{\left (a^{2} d f x + a^{2} c f - a^{2} d\right )} e^{\left (f x + e\right )}}{f^{2}} - \frac {{\left (a^{2} d f x + a^{2} c f + a^{2} d\right )} e^{\left (-f x - e\right )}}{f^{2}} - \frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f + a^{2} d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+a*cosh(f*x+e))^2,x, algorithm="giac")

[Out]

3/4*a^2*d*x^2 + 3/2*a^2*c*x + 1/16*(2*a^2*d*f*x + 2*a^2*c*f - a^2*d)*e^(2*f*x + 2*e)/f^2 + (a^2*d*f*x + a^2*c*
f - a^2*d)*e^(f*x + e)/f^2 - (a^2*d*f*x + a^2*c*f + a^2*d)*e^(-f*x - e)/f^2 - 1/16*(2*a^2*d*f*x + 2*a^2*c*f +
a^2*d)*e^(-2*f*x - 2*e)/f^2

________________________________________________________________________________________

Mupad [B]
time = 0.13, size = 123, normalized size = 1.04 \begin {gather*} \frac {3\,a^2\,d\,x^2}{4}+\frac {3\,a^2\,c\,x}{2}-\frac {a^2\,d\,{\mathrm {cosh}\left (e+f\,x\right )}^2}{4\,f^2}-\frac {2\,a^2\,d\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {2\,a^2\,c\,\mathrm {sinh}\left (e+f\,x\right )}{f}+\frac {a^2\,c\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f}+\frac {2\,a^2\,d\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f}+\frac {a^2\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*cosh(e + f*x))^2*(c + d*x),x)

[Out]

(3*a^2*d*x^2)/4 + (3*a^2*c*x)/2 - (a^2*d*cosh(e + f*x)^2)/(4*f^2) - (2*a^2*d*cosh(e + f*x))/f^2 + (2*a^2*c*sin
h(e + f*x))/f + (a^2*c*cosh(e + f*x)*sinh(e + f*x))/(2*f) + (2*a^2*d*x*sinh(e + f*x))/f + (a^2*d*x*cosh(e + f*
x)*sinh(e + f*x))/(2*f)

________________________________________________________________________________________